UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pGASmi05H4lk2J1p8lKF8znCr0vGnl46Ow6DkWColnA='
WHERE
key_id = '96eee9887699f0e3656ce715ffc6706f4ddec7c1f3790dc3632d6534215f997a'
AND (
token = 'pGASmi05H4lk2J1p8lKF8znCr0vGnl46Ow6DkWColnA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)