UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1jKeDV9ctafetvpCwKHhuCMlBIJ58ScnvVGO5n/6Ebw='
WHERE
key_id = '0ec909b6eab1c4036a808a3ea951356ef47afe2c7873736ef61473c78d0585c2'
AND (
token = '1jKeDV9ctafetvpCwKHhuCMlBIJ58ScnvVGO5n/6Ebw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)