UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rmqkR+PLbasalrPbnsnS9/MLnpDPjgX/eoCJrMOGsNw='
WHERE
key_id = '40455e8b66ad1c5762e05f1b7bdfbe891e3a8c68f743d947bcd4c46919df53a8'
AND (
token = 'rmqkR+PLbasalrPbnsnS9/MLnpDPjgX/eoCJrMOGsNw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)