UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zve5F1va4cZNXqDQrbwVt8CyEOi2hkE8ZEAjTV9+D2Q='
WHERE
key_id = '72dee34fb1828d9c42bb54552db92e5a5f605e9945c15f964a2ef6b8f68c0a29'
AND (
token = 'zve5F1va4cZNXqDQrbwVt8CyEOi2hkE8ZEAjTV9+D2Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)