UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'X/cPKNS1Ac+hWRCAIKGMfZQ/6g/7ZOy0CZYmohHdhCQ=' 
WHERE 
  key_id = '5d3625e54ec266d76fbae9deaed7f9c370ade5a3a3d85817fcb8bf888d4359bf' 
  AND (
    token = 'X/cPKNS1Ac+hWRCAIKGMfZQ/6g/7ZOy0CZYmohHdhCQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045