UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '99EJU/TfcJbYeSdVFsE2pFZYruKOUzvVh4xSorvkaOM=' 
WHERE 
  key_id = '36c28b28da23af2c939b19cb0ecfaa6a740e01989f73b9189c262871aeace178' 
  AND (
    token = '99EJU/TfcJbYeSdVFsE2pFZYruKOUzvVh4xSorvkaOM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015