UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Z/fyMnxll2DeQP/UQAODzioM4Hua4VvMTG/nsJO163g='
WHERE
key_id = 'd3d69173b95851f44bb53d7b657acbb56929deb2c45ea0fba17cee243c2c2e6c'
AND (
token = 'Z/fyMnxll2DeQP/UQAODzioM4Hua4VvMTG/nsJO163g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)