UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ZBncwqomhIuRCd3Iw5+uwhiEQwjDPs4x0PIYJa6EVW8=' 
WHERE 
  key_id = '5d6b481cad3a27a9f30a549666a40614c6f94b12302e3f566cba6ae32ee090dd' 
  AND (
    token = 'ZBncwqomhIuRCd3Iw5+uwhiEQwjDPs4x0PIYJa6EVW8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038