UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'BAIPbvU59/TYLrg+eQ9vSPA6wHmjybOw1kEgaBLFWdY=' 
WHERE 
  key_id = '600f78b9ebad5171d65e3727a6030b3dfd97bc08c010561f76db9f0c21168b95' 
  AND (
    token = 'BAIPbvU59/TYLrg+eQ9vSPA6wHmjybOw1kEgaBLFWdY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024