UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ONABtMvAS7I0dKVI0DbwZzscB76LJ2vp1xr94Sk37/o='
WHERE
key_id = '24cd20f2dff6db1fed00ee112ea70ce293367decbece5882f4ab779aa61fc6ed'
AND (
token = 'ONABtMvAS7I0dKVI0DbwZzscB76LJ2vp1xr94Sk37/o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)