UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vGZlfsbYbs6C+oWdUtnLz/KJ1H3VRlbtAf2f4heauQs=' 
WHERE 
  key_id = '5429ba696a1ffbcbb2d5b16af28916c12f321d52c5916ccb701684f326cdccc4' 
  AND (
    token = 'vGZlfsbYbs6C+oWdUtnLz/KJ1H3VRlbtAf2f4heauQs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038