UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DsSLCRHFnXIUuC4AtbvzcfWNFvaDc5V/vbG3+hPq9VE='
WHERE
key_id = 'dd56a33d26f99038db6b38d653967df62ee4a645514889990965da91b169a703'
AND (
token = 'DsSLCRHFnXIUuC4AtbvzcfWNFvaDc5V/vbG3+hPq9VE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)