UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Nc+PkVFMhMFkvRw2Ny0b9hEiEZAHW9tAOYiOudAZb0k='
WHERE
key_id = '63943e7db75acc26da0d963526bd920ee4a249fdaa85180ed41f6b603a881cf7'
AND (
token = 'Nc+PkVFMhMFkvRw2Ny0b9hEiEZAHW9tAOYiOudAZb0k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)