UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hWFmWBsq5tz6NnUXESaTr/adbD0vxdb8ZseytZijTJw='
WHERE
key_id = '91e620aa4e4ed559b29116e95f5a5de40578a9046778e0b5644fd3ee6d4cb1e6'
AND (
token = 'hWFmWBsq5tz6NnUXESaTr/adbD0vxdb8ZseytZijTJw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)