UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FV//5GFWFP9DwItM+Aw38XYmvWgrQ+k3F428lN2bDpo='
WHERE
key_id = '6930989067b5c5e64f6fc5beecbcfb2495c104aa0783485f7faba1c9d4d7d2f6'
AND (
token = 'FV//5GFWFP9DwItM+Aw38XYmvWgrQ+k3F428lN2bDpo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)