UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DljNMPNNoXR8jRvZbXVZfqK2Ix8tR1e5Mm+xWRDqufI=' 
WHERE 
  key_id = '7d0bdb57dbb6fa6eef338229f6f584de03a2e9cfe8de4de7315f084d0f3c0fa0' 
  AND (
    token = 'DljNMPNNoXR8jRvZbXVZfqK2Ix8tR1e5Mm+xWRDqufI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033