UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PIh/Gc+P6lD/7pxXKGGF4FqLhl/uUhHaVTeyPTRNQ4M='
WHERE
key_id = '6f6d8d15e3cfb6e042526cfb996e3c9243ef7aadb2d73c0fc837026c42050908'
AND (
token = 'PIh/Gc+P6lD/7pxXKGGF4FqLhl/uUhHaVTeyPTRNQ4M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)