UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EHHrWqgh8TJ1bLkwt4S0o/No7J391G4L+491kopfj/g=' 
WHERE 
  key_id = 'aced403252beb07479cacfd22521ee3b032be2a3f9aea2b472b4e28a8e3cce64' 
  AND (
    token = 'EHHrWqgh8TJ1bLkwt4S0o/No7J391G4L+491kopfj/g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019