UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lUxqlxz+/6tWAfu9kYGa91fMIq3QGiI+LvgQQxNxQJQ='
WHERE
key_id = '7529a5dfb5549819a43c909db8fddbf4691096f2d1069d79c86d8213abfc37c3'
AND (
token = 'lUxqlxz+/6tWAfu9kYGa91fMIq3QGiI+LvgQQxNxQJQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)