UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kFTWL359AzpdQl+w1AoUD4hp9IwvF68jJEhOr5TEdtE=' 
WHERE 
  key_id = '6e4692fd15396d3e771241014997a4c0bf12ac73c83f100b644121da78008903' 
  AND (
    token = 'kFTWL359AzpdQl+w1AoUD4hp9IwvF68jJEhOr5TEdtE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029