UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jBBFKOWEXFa1npWT3Sh0rThXcijdCfk6bS/1FBqflUI=' 
WHERE 
  key_id = '3743054a50b9f6d97cc3a7f1e9d10cb9f8f78f58f91d63d30fcf213ccc883a32' 
  AND (
    token = 'jBBFKOWEXFa1npWT3Sh0rThXcijdCfk6bS/1FBqflUI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025