UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/aUosjwCEoD5m6dyw25PdG7Aps59LjF/NSdYCURuTiE=' 
WHERE 
  key_id = '4bd12da9644cbcb74ae14d68de9767e222e536b3223b428d65bd52e6f500f189' 
  AND (
    token = '/aUosjwCEoD5m6dyw25PdG7Aps59LjF/NSdYCURuTiE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020