UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jZU7M4ddc3BuwAqwNtTOZmCjhYmvchRpLR/SbSUmTNc='
WHERE
key_id = 'c06aa70519c9579f3a716de6f4fff3aa7cc87ffab085589c61a21a2cbf913ff8'
AND (
token = 'jZU7M4ddc3BuwAqwNtTOZmCjhYmvchRpLR/SbSUmTNc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)