UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '881m/LZlTdo3vtDC112wIIlZ4oRJdVn0kx5ygQyMuwY='
WHERE
key_id = 'de78d8a450e43e530011c92f3994c4dc59f9850c09807f7cc0b62ec2c03561db'
AND (
token = '881m/LZlTdo3vtDC112wIIlZ4oRJdVn0kx5ygQyMuwY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)