UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V/UJXUdUJrBaodk3E0rC6KpIbUxMjnJb+TFdIkoXfK4='
WHERE
key_id = '1d191eb3f4fd6b9b1f3167a73e569c0150b79e0121db9a5f3146f33bba88020a'
AND (
token = 'V/UJXUdUJrBaodk3E0rC6KpIbUxMjnJb+TFdIkoXfK4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)