UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ZSSFWyt4N2+zhSAe1erCtAwLOBWniaqTtk3t1gk0/8M=' 
WHERE 
  key_id = '4c9b1dfe3f140ccb8088b99ca2a412ac76d8c189511cecacd781f25fc95b46c4' 
  AND (
    token = 'ZSSFWyt4N2+zhSAe1erCtAwLOBWniaqTtk3t1gk0/8M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020