UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sn/OqbFAkxHbKakHyERBO4rkBBC0DgZbOaLBspW2vYI='
WHERE
key_id = '143b2c37f8c420f5594cae47c636fcc0dbfa5f5a8f0a36005d8e079c6e0475f8'
AND (
token = 'sn/OqbFAkxHbKakHyERBO4rkBBC0DgZbOaLBspW2vYI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)