UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '050EQ+V/a+XUt+BW5h5zl00snD91lPZM7grVLz0B7Vw='
WHERE
key_id = 'dcea444eea9d24e248635106210ad7369c625b7129a7413e8bdb6263b01cbf85'
AND (
token = '050EQ+V/a+XUt+BW5h5zl00snD91lPZM7grVLz0B7Vw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)