UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L4ifM48t03Zvc0tk2I9hE4VR3C6/DYP4rcPBi2/ZgJo='
WHERE
key_id = 'ca5690aca8f47e6e03d414adee8033ff77331883c23e9aebc7a767d514ef6447'
AND (
token = 'L4ifM48t03Zvc0tk2I9hE4VR3C6/DYP4rcPBi2/ZgJo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)