UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'R+OVHwiP0mDWFMMekti4qvIJ56KN4eqWANHUfFCOnow=' 
WHERE 
  key_id = '26d20f7bb9763daa5a97b8c2ba44ab1f6ce8be526b7d8399310bed9833d83f0a' 
  AND (
    token = 'R+OVHwiP0mDWFMMekti4qvIJ56KN4eqWANHUfFCOnow=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021