UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HI2BIf+nsLD/dPdC/agSeXNYaq/l2WQDP8gdl6zPCQU='
WHERE
key_id = 'abb43082480647514372f0954ff1869edeee4a85e85c5e5094611b26dcbf3c5e'
AND (
token = 'HI2BIf+nsLD/dPdC/agSeXNYaq/l2WQDP8gdl6zPCQU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)