UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'q1eLox4lXb37xYgrtMY/8gsz/ToCjwHzhe3jsLGNgHw=' 
WHERE 
  key_id = '53fc2c6271b965ca42c6d59b276404e12cbaaa9dbc32354505b4a9599e311dca' 
  AND (
    token = 'q1eLox4lXb37xYgrtMY/8gsz/ToCjwHzhe3jsLGNgHw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016