UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'dUnzQ7uIMYZFJ3TXjtdyzGpE4JnKLTBa/yEkQHwLHE8=' 
WHERE 
  key_id = 'db68138c671d55f5bfd875f67a3e0ebb6d2b8a53444dd302ccc8a91e379e7fba' 
  AND (
    token = 'dUnzQ7uIMYZFJ3TXjtdyzGpE4JnKLTBa/yEkQHwLHE8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018