UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3NqL5LzZ/PElX0BkPS+FATTkgh7VJ79ZXkbsIawtBEA='
WHERE
key_id = '87b17e89e21eee6d49bb7c0cbdf79b1b75d8cac09d3d39de038c7efe74cac7f3'
AND (
token = '3NqL5LzZ/PElX0BkPS+FATTkgh7VJ79ZXkbsIawtBEA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)