UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ss8wdOVzfr0ki+dvZMQc8cv3tSHcx0KuRA1WVY/uvc0='
WHERE
key_id = '2c68a33fc095ae5a5998635d0f38df8423c5ae04d3c345036c6a084314ada918'
AND (
token = 'ss8wdOVzfr0ki+dvZMQc8cv3tSHcx0KuRA1WVY/uvc0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)