UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/QclpECEWyQQp35KCYNOxoIIjNzG5kACveNzilUoKBU=' 
WHERE 
  key_id = '30884f2d4fcb659ac5660520442974ec5922ed2e8cd9c01b691830b4095619a3' 
  AND (
    token = '/QclpECEWyQQp35KCYNOxoIIjNzG5kACveNzilUoKBU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045