UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oGkr8Crt6FpKuVrmFh7qHoofU6jtEzVF5n0C4Qryv1Y='
WHERE
key_id = 'a132e45bf9410e30bfb9d6670f32fccd2bae62a1fd3d9e9ee16ef7601d1724b1'
AND (
token = 'oGkr8Crt6FpKuVrmFh7qHoofU6jtEzVF5n0C4Qryv1Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)