UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'p0xFry1WwFoRtLbLoDf/UTej/kSL/JaZHRzbviEw5J8='
WHERE
key_id = '25df9c3bbe26c53c7a7add5f57e91cfaf371a7d32d1a6726b76cb379f8d66262'
AND (
token = 'p0xFry1WwFoRtLbLoDf/UTej/kSL/JaZHRzbviEw5J8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)