UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's5UlOR60DzlL2kwFzeLC6GfRReQt0QVwrKAWN93NkOE='
WHERE
key_id = 'd3fac347c527a99fc78b0f7dd95c9bfd79604f91ee90cf61d550eaf1cb2a9538'
AND (
token = 's5UlOR60DzlL2kwFzeLC6GfRReQt0QVwrKAWN93NkOE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)