UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ODigtwyqgd/n0Y0VpepZgW2LjJPGIrl7qvMTEPN77+4=' 
WHERE 
  key_id = '419de64d823812fa52d5a3dfcedea65181a9b7c0a8e7d65a1d9da392fab119db' 
  AND (
    token = 'ODigtwyqgd/n0Y0VpepZgW2LjJPGIrl7qvMTEPN77+4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048