UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zzaDc/hIYAQ3t4PVbLrXjoFETzq8kLroiDzGN35dSFg='
WHERE
key_id = '2ed7edd754b1f23cd29db9aeb7b93f6a1fe671db81095df0cf322cce9389da8c'
AND (
token = 'zzaDc/hIYAQ3t4PVbLrXjoFETzq8kLroiDzGN35dSFg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)