UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LGAZGt4RrcpDBpvFEO/ngUCw8vjHG3/YRkg2nM7Nl0Y='
WHERE
key_id = '9528bcc6997269fba64eff7ed13f1a21389e4c404ffc88bb610c19f184dfc3e4'
AND (
token = 'LGAZGt4RrcpDBpvFEO/ngUCw8vjHG3/YRkg2nM7Nl0Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)