UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wKnIFT+tppj7noA/84fj2rN+yoHljj5WNTqBXlqKpYA='
WHERE
key_id = '7461e7e7337182ab281838acdb33ce1ab02a56646a3038545584b43dfddb3c8e'
AND (
token = 'wKnIFT+tppj7noA/84fj2rN+yoHljj5WNTqBXlqKpYA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)